package com.geekathon.mobzilla.model;

public enum Priority {

	P1(1), P2(2), P3(3), P4(4), P5(5);

	int value;

	private Priority(int priority) {
		value = priority;
	}

	public int getValue() {
		return value;
	}

	@Override
	public String toString() {
		return String.valueOf(value);
	}

	public static int getEnumFormString(String str) {
		if (str.equalsIgnoreCase("P1")) {
			return 1;
		}
		if (str.equalsIgnoreCase("P2")) {
			return 2;
		}
		if (str.equalsIgnoreCase("P3")) {
			return 3;
		}
		if (str.equalsIgnoreCase("P4")) {
			return 4;
		}
		if (str.equalsIgnoreCase("P5")) {
			return 5;
		}
		return 0;
	}

}
